package com.qf.pojo;

import com.qf.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName Branch
 * @Description TODO
 * @Author Windy
 * @Date 2022/8/25 19:53
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Branch {
    /**
     * CREATE TABLE `branch` (
     *   `bid` varchar(32) NOT NULL,
     *   `bname` varchar(50) NOT NULL,
     *   `pid` int(11) DEFAULT NULL,
     *   `updatetime` datetime DEFAULT NULL,
     *   `status` int(11) DEFAULT '1',
     *   PRIMARY KEY (`bid`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     */
    private String bid;
    private String bname;
    private int pid;
    private String updatetime;
    private int status;

    private List<TaskPlan> taskPlans;

    @Override
    public String toString() {
        return "Branch{" +
                "bid='" + bid + '\'' +
                ", bname='" + bname + '\'' +
                ", pid=" + pid +
                ", updatetime='" + updatetime + '\'' +
                ", status=" + status +
                "\ntaskPlans=\n" + ArrayUtil.changeArray(taskPlans) +
                '}';
    }
}
